home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / clmfeb85.zip / ARGBEGIN.H next >
Text File  |  1988-07-25  |  1KB  |  47 lines

  1. /* argbegin.h: @(#) Begin argument parsing sandwich, see argparse.h */
  2. /* by Alexander B. Abacus */
  3.  
  4. #ifndef ArgCount
  5. #define ArgCount argc
  6. #endif
  7.  
  8. #ifndef ArgVector
  9. #define ArgVector argv
  10. #endif
  11.  
  12. { /* Begin block with local variables. Ends with argend.h */
  13.   struct
  14.   {
  15.     char ** tutorial;
  16.     char ** argVector;
  17.     char *  description[2];
  18.     char *  textPointer;
  19.     char *  keyPointer;
  20.     char *  (*ptrFunction) ();
  21.     int *   ptrArgCount;
  22.     int     argc;
  23.     int     minPositionals;
  24.     int     maxPositionals;
  25.     int     keysLeading;
  26.     int     argIndex;
  27.     int     charIndex;
  28.     int     nextPositional;
  29.     int     noOfPositionals;
  30.     int     keysTerminated; /* ON/OFF switch */
  31.     char    keyTrigger;
  32.   } a0;
  33.  
  34.   a0.ptrArgCount = &(ArgCount);
  35.   a0.argc = *a0.ptrArgCount;
  36.   a0.argVector = (ArgVector);
  37.   a0.minPositionals = -1;
  38.   a0.maxPositionals = -1;
  39.   a0.ptrFunction = argPos;
  40.   a0.keysLeading = 0;
  41.   a0.keyTrigger = '-';
  42.   a0.tutorial = & a0.description[0];
  43.   a0.description[0] = "Description of arguments is not provided.\n";
  44.   a0.description[1] = (char *) 0;
  45.  
  46. /* argbegin.h: End of file. */
  47.